import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
import { dateTransformer } from '../../../../common/utils';

@Entity('message_template', {
  comment: '模板信息表',
})
export class TemplateEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id', comment: '主键ID' })
  public id: number;

  @Column({ type: 'varchar', name: 'name', default: '', comment: '模板名称' })
  public name: string;

  @Column({ type: 'varchar', name: 'template_code', default: '', comment: '模板编码' })
  public templateCode: string;

  @Column({ type: 'varchar', name: 'sign_name', default: '', comment: '签名名称' })
  public signName: string;

  @Column({ type: 'char', name: 'del_flag', default: false, comment: '删除标志' })
  public delFlag: string;

  @CreateDateColumn({ type: 'datetime', name: 'create_time', default: null, transformer: dateTransformer, comment: '创建时间' })
  public createTime: Date;

  @UpdateDateColumn({ type: 'datetime', name: 'update_time', default: null, transformer: dateTransformer, comment: '更新时间' })
  public updateTime: Date;
}
